﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserForm.ascx.cs" Inherits="CuaHangLego.Webform.Controls.UserForm" %>
<asp:Panel runat="server" CssClass="UserForm">
    <asp:UpdatePanel runat="server">
    <ContentTemplate>
    <asp:Panel ID="NoLoginPanel" CssClass="NoLoginPanel" runat="server" Visible="true">
        <asp:Label ID="Label1" runat="server" Text="Bạn chưa đăng nhập!<br /> Vui lòng đăng nhập " /><asp:LinkButton runat="server" Text="tại đây" ID="BtLogin" OnCommand="BtLogin_Command" />
    </asp:Panel>
    <asp:Panel ID="LoggedPanel" runat="server" CssClass="LoggedPanel" Visible="false">
        <asp:Label ID="txtUserHello" runat="server" Text="" />
        <br />
        <asp:Label ID="txtSoLuong" Text="Bạn có 0 sản phẩm trong giỏ hàng" runat="server" />
        <br />
        <asp:Button ID="ButtonViewShoppingCart" OnCommand="ButtonViewShoppingCart_Command" runat="server" Text="Xem giỏ hàng" />
        <asp:Button ID="ButtonLogout" OnCommand="ButtonLogout_Command" runat="server" Text="Đăng xuất" />
    </asp:Panel>
    <asp:Panel runat="server" CssClass="LoginForm" ID="Form1">
        <asp:ImageButton runat="server" ID="ButtonClose" CssClass="ButtonClose" ImageUrl="~/img/close.png" OnCommand="ButtonClose_Command" />
        <asp:Login runat="server"
            ID="LoginFm"
            BorderStyle="Solid" 
            BackColor="#FFFFFF" 
            BorderWidth="5px"
            BorderColor="#0088AA" 
            Font-Size="Medium"
            CreateUserText="Tạo tài khoản mới..."
            CreateUserUrl="../Register.aspx"
            UserNameLabelText="Tài khoản/Email"
            PasswordLabelText="Mật khẩu"
            RememberMeText="Ghi nhớ mật khẩu"
            OnLoggedIn="LoginFm_LoggedIn"
            TitleText="Đăng nhập"
            OnAuthenticate="LoginFm_Authenticate"
            LoginButtonText="Đăng nhập">
            <TitleTextStyle 
                Font-Bold="True" 
                ForeColor="#FFFFFF" 
                BackColor="#0088AA">
            </TitleTextStyle>
            <TextBoxStyle Font-Size="Medium" />
        </asp:Login>
    </asp:Panel>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Panel>